//
//  ProtocolManager.h
//  WisdomZhuHai
//
//  Created by Admin on 14-10-24.
//  Copyright (c) 2014年 wyd. All rights reserved.
//  协议管理

#import <Foundation/Foundation.h>
#import "ProtocolDefine.h"
#import "HttpRequestManager.h"

@interface ProtocolManager : NSObject

@property (nonatomic,strong) NSString* server_url;
@property (nonatomic,strong) NSString* api_base_url;
@property (nonatomic,strong) NSString* api_base_img_url;
@property (nonatomic,strong) NSString* sid;
@property (nonatomic,assign) int userId;
@property (nonatomic,strong) NSString* loginName;
@property (nonatomic,strong) NSString* mobile;
@property (nonatomic,strong) NSString* username;
@property (nonatomic,strong) NSString* currCash;
@property (nonatomic, assign)float latitude;
@property (nonatomic, assign)float longitude;
@property (nonatomic, strong) NSString *telephone;
@property (nonatomic, assign) BOOL isLoginedByPhone;


+ (ProtocolManager*)shareInstance;

//收藏
- (void)saveCollection:(int)type userName:(NSString*)userName requestId:(NSString*)requestId target:(id)target selector:(SEL)selector;
- (void)cancelCollection:(NSString*)userName requestId:(NSString*)requestId target:(id)target selector:(SEL)selector;

//商家
- (void)getStoreType:(id)target selector:(SEL)selector;
- (void)getStoresList:(int)type returnCount:(int)returnCount beginNo:(int)beginNo area:(NSString*)area star:(NSString*)star storeType:(NSString*)storeType target:(id)target selector:(SEL)selector;
- (void)getGoodsList:(int)price returnCount:(int)returnCount beginNo:(int)beginNo target:(id)target selector:(SEL)selector;
- (void)getStoreDetail:(int)store_id sendType:(NSString*)sendType target:(id)target selector:(SEL)selector;
- (void)getSingleGoodDetail:(int)goodId sendType:(NSString*)type target:(id)target selector:(SEL)selector;
- (void)getStoreListWithId:(int)storeId andTarget:(id)target selector:(SEL)selector;

//用户
- (void)getUserInfo:(NSString *)loginname target:(id)target selector:(SEL)selector;
- (void)login:(NSString*)loginName password:(NSString*)password mobileModel:(NSString*)mobileModel loginCity:(NSString*)loginCity appVersion:(NSString*)appVersion OSversion:(NSString*)OSversion mac:(NSString*)mac target:(id)target selector:(SEL)selector;
- (void)register:(NSString*)loginName password:(NSString*)password mobileModel:(NSString*)mobileModel loginCity:(NSString*)loginCity mac:(NSString*)mac target:(id)target selector:(SEL)selector;
- (void)logout:(id)target selector:(SEL)selector;
- (void)update:(NSString *)username gender:(NSString *)gender birthday:(NSString *)birthday industry:(NSString *)industry email:(NSString *)email address:(NSString *)address target:(id)target selector:(SEL)selector;
- (void)mobileLogin:(NSString*)mobile mobileModel:(NSString*)mobileModel loginCity:(NSString*)loginCity appVersion:(NSString*)appVersion OSversion:(NSString*)OSversion mac:(NSString*)mac target:(id)target selector:(SEL)selector;
- (void)mobileBinding:(NSString *)loginName mobile:(NSString *)mobile target:(id)target selector:(SEL)selector;


//订单
- (void)getOrderList:(NSString*)loginName pageIndex:(NSString*)pageIndex andStatus:(int)status target:(id)target selector:(SEL)selector;

//首页专题
-(void)getSlidesAndSpecial:(id)target selector:(SEL)selector;

//首页资讯
-(void)getMessageList:(int)typeId topicId:(int)topicId returnCount:(int)returnCount beginNo:(int)beginNo target:(id)target selector:(SEL)selector;

//攻略
- (void)getClassify:(id)target selector:(SEL)selector;
- (void)getStrategy:(NSNumber*)Id target:(id)target selector:(SEL)selector;
- (void)getContent:(int)Id target:(id)target selector:(SEL)selector;
- (void)getNewContent:(int)Id target:(id)target selector:(SEL)selector;

//工具
- (void)getToolsWithCity:(NSString *)city andTarget:(id)target selector:(SEL)selector;
- (void)getToolDetailsListWithId:(NSString *)tId andTarget:(id)target selector:(SEL)selector;


//支付
- (void)allowance:(NSString*)allowance target:(id)target selector:(SEL)selector;
- (void)mobileValidation:(NSString*)mobile target:(id)target selector:(SEL)selector;
- (void)submitOrder:(int)productId mobile:(NSString*)mobile couponCode:(NSString*)couponCode num:(int)num orderPrice:(CGFloat)orderPrice orderSN:(NSString*)orderSN note:(NSString*)note target:(id)target selector:(SEL)selector;
- (void)confirmOrderPay:(NSString*)orderSN payWay:(NSString*)payWay isUseBalance:(int)isUseBalance coupon:(NSString*)coupon target:(id)target selector:(SEL)selector;
- (void)completeOrder:(NSString*)status paystatus:(NSString*)paystatus orderSN:(NSString*)orderSN note:(NSString*)note target:(id)target selector:(SEL)selector;
- (void)orderRefund:(NSString*)orderSN confirm:(BOOL)confirm target:(id)target selector:(SEL)selector;
- (void)getOrderDetail:(NSString*)orderSN target:(id)target selector:(SEL)selector;
- (void)cancelOrder:(NSString*)orderSN target:(id)target selector:(SEL)selector;

//设置相关
-(void)getUpdateInfo:(id)target selector:(SEL)selector;
-(void)getAppEvaluateUrl:(id)target selector:(SEL)selector;
-(void)feedBack:(NSString *)loginName msg:(NSString *)mgs OSversion:(NSString*)OSversion target:(id)target selector:(SEL)selector;

//version 2.0
//首页新闻列表
- (void)getHomePageNewsList:(int)returnCount beginNo:(int)beginNo target:(id)target selector:(SEL)selector;
//新闻列表
- (void)getNewsListWithCategoryId:(int)category_id andCount:(int)returnCount beginNo:(int)beginNo target:(id)target selector:(SEL)selector;
//食住行娱乐购列表
- (void)getFLWTEBList:(int)returnCount beginNo:(int)beginNo typeId:(int)typeId API:(NSString*)API REQ:(NSString*)REQ andDistance:(NSString *)distance tag:(NSString *)tag areaName:(NSString *)areaName target:(id)target selector:(SEL)selector;
//筛选类别
- (void)getFLWTEBFliterExtraTypeWithTypeId:(int)typeId andTarget:(id)target andSelector:(SEL)selector;
//地区类别
- (void)getFLWTEBFliterDistrictWithTarget:(id)target andSelector:(SEL)selector;
//我的优惠券列表
- (void)getCouponListWithStatus:(int)status andPage:(NSString *)page target:(id)target selector:(SEL)selector;
//我的 OK 券列表
- (void)getOkListWithStatus:(int)status andPage:(int)page target:(id)target selector:(SEL)selector;
//获取验证码（绑定用）
- (void)mobileValidationWithMobile:(NSString*)mobile target:(id)target selector:(SEL)selector;
//（找回密码、登录用）
- (void)getVerifyCodeWithMobile:(NSString *)mobile target:(id)target selector:(SEL)selector;
- (void)sendVerifyMailWithMail:(NSString *)mail andTarget:(id)target andSelector:(SEL)selector;
//点赞
- (void)likeWithTypeName:(NSString *)typeName andTargetId:(int)targetId andTarget:(id)target andSelector:(SEL)selector;
//收藏
- (void)getCollectionsWithLoginName:(NSString *)loginName andCount:(int)returnCount beginNo:(int)beginNo andTarget:(id)target andSelector:(SEL)selector;
- (void)getCollectionWithType:(NSString *)type andLoginname:(NSString *)loginname andCount:(int)count andBeginNo:(int)beginNo andTarget:(id)target andSelector:(SEL)selector;
- (void)addToCollectionWithType:(NSString *)typeName andUsername:(NSString *)loginName andTargetId:(int)target_id andTarget:(id)target andSelector:(SEL)selector;
- (void)deleteFromCollectionWithType:(NSString *)typeName andUsername:(NSString *)loginName andTargetId:(int)target_id andTarget:(id)target andSelector:(SEL)selector;
//获取筛选列表
- (void)getSiftStoreList:(NSArray*)tagsList typesList:(NSArray*)typesList areasList:(NSArray*)areasList distance:(NSString*)distance returnCount:(int)returnCount beginNo:(int)beginNo target:(id)target selector:(SEL)selector;
//评论
- (void)getCommentListWithTargetId:(int)target_id andType:(NSString *)type andReturnCount:(int)count andBeginNo:(int)beginNo andTarget:(id)target andSelector:(SEL)selector;
- (void)sendCommentWithTargetId:(int)target_id andType:(NSString *)type andContent:(NSString *)content andUserId:(int)user_id andTarget:(id)target andSelector:(SEL)selector;
//全局搜索
- (void)getGlobalSearch:(NSString*)keyword target:(id)target returnCount:(int)returnCount beginNo:(int)beginNo selector:(SEL)selector;
//修改密码
- (void)sendChangePasswordWithOld:(NSString *)password andNewPassword:(NSString *)newPassword andLoginName:(NSString *)loginname andTarget:(id)target andSelector:(SEL)selector;
- (void)sendChangePasswordWithNew:(NSString *)password andMobile:(NSString *)loginname andTarget:(id)target andSelector:(SEL)selector;
//支付
- (void)getCouponListForPay:(NSString*)orderSn andTarget:(id)target andSelector:(SEL)selector;

//获取时间戳
-(NSString*)getTimeStamp;

//专题页面
- (void)getTopSpecailDetailsWithTopicId:(int)topicId target:(id)target selector:(SEL)selector;
//全部专题
- (void)getAllTopSpecailsWithtarget:(id)target selector:(SEL)selector;

//version 2.1 -Bable



@end
